package com.wu.enums;

import com.wu.exception.EnumInterface;

/**
 * 登录枚举类
 */
public enum LoginEnum implements EnumInterface<String, String, String> {

    USER_LOGIN_FAIL("L001","fail", "用户登录失败"),
    USER_LOGIN_FAIL_USER_PASSWORD_FAIL_MSG("L002","user no exist or password error", "用户不存在或密码错误"),
    USER_LOGIN_FAIL_FREEZEED_MSG("L003","user frozen", "用户名已冻结"),
    USER_LOGIN_FAIL_NO_ACTIVATION_MSG("L004","user not active", "用户未激活"),
    USER_LOGIN_FAIL_NO_AUTHORIZATION_MSG("L005","平台未授权", "平台未授权"),
    USER_PASSWORD_MODIFY_FAIL_UNLIKE_MSG("L006","输入新密码不一致", "输入新密码不一致"),
    USER_PASSWORD_MODIFY_FAIL_NOTPASS_MSG("L007","原密码不正确", "原密码不正确"),
    UN_LOGIN_ERROR("L008","没有登陆", "没有登陆"),
    USER_REGISTER_FAIL("L009","用户名已存在", "用户名已存在"),
    VERY_NUM_CODE_FAIL("L010","very_num_code_fail","验证失败,请重试"),

    ;
    /**
     * 错误编号
     */
    private String code;

    /**
     * 错误信息
     */
    private String msg;

    /**
     * 错误描述
     */
    private String desc;

    private LoginEnum(String code, String msg, String desc) {
        this.code = code;
        this.msg = msg;
        this.desc = desc;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    @Override
    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public void setDesc(String desc) {
        this.desc = desc;
    }
}
